home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 August: Tool Chest / Dev.CD Aug 98 TC.toast / Tool Chest / Testing & Debugging / Virtual User / Virtual User Current Release / Examples / External Tool Templates / C Tool Template / YourTool_Async.vu < prev    next >
Encoding:
Text File  |  1998-06-04  |  732 b   |  38 lines  |  [TEXT/MPS ]

  1. #
  2. #  External_Tools interface test script.
  3. #
  4.  
  5. Libraries "YourTool.vulib"; 
  6.  
  7. x := YourTool( "Initialize", true);
  8. println x;
  9.  
  10. asyncInfo := YourTool( "YourService", 1, 1) async:true;
  11.  
  12. println ">> YourTool (async info)";
  13. println asyncInfo;
  14. println;
  15.  
  16. x := YourTool( "GetToolVersion" );
  17. println x;
  18.  
  19. x := YourTool( "GetToolServices");
  20. println x;
  21.  
  22. x := YourTool( "ServiceSupported", "YourService");
  23. println x;
  24.  
  25.  
  26. # Now that we have done the other service requests,
  27. #    let's check to see if our asynchronous request for
  28. #    the "YourService" service has completed yet.
  29. while( asyncInfo[1] = 1 )
  30. begin
  31.     println    "Polling...";
  32.     asyncInfo := YourTool( "Poll", asyncInfo[2] );
  33. end;
  34.  
  35. println;
  36. println ">> YourTool (after polling)";
  37. println asyncInfo;
  38.